package com.itheima_05;

public class breeder {

    public static void breed(Animal an){ // new Dog
        an.drink();
        an.eat();
       /* Dog d =(Dog)an;
        d.swimming();
        frog f=(frog) an;
        f.swimming();*/
        if(an instanceof swimming){
            swimming s =(swimming) an;
            s.swimming();
        }
        System.out.println();
    }
}
